#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <Windows.h>
#include <qabstractnativeeventfilter.h>
#include "mywinusb.h"



QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow, public QAbstractNativeEventFilter
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

     bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;

private slots:
     void on_pushButton_write_clicked();

     void on_pushButton_read_clicked();

     void on_pushButton_sp_test_clicked();

     void printUSBErrorInfo(QString s);

     void on_pushButton_read_def_clicked();

     void on_pushButton_write_def_clicked();

     void on_pushButton_clicked();

     void on_comboBox_activated(int index);

     void on_comboBox_2_activated(int index);

     void on_comboBox_3_activated(int index);

     void on_comboBox_wValue_activated(int index);

     void on_comboBox_bRequest_activated(int index);

     void on_comboBox_wValue_str_activated(int index);

private:
    Ui::MainWindow *ui;
    mywinusb usb;


};
#endif // MAINWINDOW_H
